#include "ModRunDescOutput.h"
#include <QDebug>
#include "..\..\Visitor\VisitorDisplayName.h"

//输出显示Desc;
CModRunDescOutput::CModRunDescOutput(IUIElement* pElement)
{
    m_pElement = pElement;
}

CModRunDescOutput::~CModRunDescOutput()
{
    
}

//输出信息;
void CModRunDescOutput::OutPut(std::initializer_list <QString> outList, int flag/* = 0*/)
{
    Q_UNUSED(flag);

    int index = 0;
    for (auto beg = outList.begin(); beg != outList.end(); beg++)
    {
        if (index == 0)
        {
            //名称;
            QString strName = *beg;
            VisitorDisplayName visiter(strName, "lab_ModName");
            if (m_pElement)
            {
                m_pElement->accept(visiter);
            }
        }
        else if (index == 1)
        {
            //描述;
            QString strDesc = *beg;
            VisitorDisplayName visiter(strDesc, "lab_ModDesc");
            if (m_pElement)
            {
                m_pElement->accept(visiter);
            }
        }
        index++;
    }

}

